/***************************************************************************\
 * The Mattise Kernel														*
 * Copyright 2007 Matthew Iselin											*
 * THIS FILE is Public Domain												*
 *																			*
 * stdio.h																	*
 *																			*
 * Handles standard I/O, which is a layer of functionality over low-level	*
 * I/O routines.															*
 *																			*
\***************************************************************************/

#ifndef STDIO_H
#define STDIO_H

/*** CONSOLE I/O ***/

// print formatted output
extern "C" int printf( const char *fmt, ... );
extern "C" int kprintf( const char* fmt, ... );

// formatted data --> string
extern "C" int sprintf( char *buffer, const char *fmt, ... );

/*** FILE I/O ***/
int fopen( const char* file, const char* mode );
int fclose( int fd );
int fread( void* buff, int buffsz, int cnt, int fd );
int fwrite( void* buff, int buffsz, int cnt, int fd );
int fputc( int fd, int c );
int fgetc( int fd );
int feof( int fd );
int fseek( int fd, int offset, int whence );
int fsize( int fd );

#endif
